<script>
init({
  title: 'Issue #409',
  desc: 'Refresh method with new url(<a href="https://github.com/wenzhixin/bootstrap-table/issues/409" target="_blank">#409</a>).',
  links: ['bootstrap-table.min.css'],
  scripts: ['bootstrap-table.min.js']
})
</script>

<template>
  <div class="toolbar">
    <button
      id="refresh"
      class="btn btn-secondary"
    >
      Refresh
    </button>
  </div>
  <table
    id="table"
    data-toggle="table"
    data-toolbar=".toolbar"
    data-url="json/data1.json"
  >
    <thead>
      <tr>
        <th data-field="id">
          ID
        </th>
        <th data-field="name">
          Item Name
        </th>
        <th data-field="price">
          Item Price
        </th>
      </tr>
    </thead>
  </table>
</template>

<script>
  const $table = $('#table')

  function mounted () {
    $('#refresh').click(function () {
      $table.bootstrapTable('refresh', {
        url: 'json/409.json'
      })
    })
  }
</script>
